Analyzing @ktmwithmadhes with Data Science¶

Last six months have been extremely unfortunate for Nepalese. After the massive earthquake, Nepal is suffering from a political crisis and inhumane blockade. Morally corrupt government/madeshi-morcha and unethical blockade have led to a serious humanitarian crisis in Nepal. Furthermore, 100+ days of the strike has crumbled the economy in a way that it will take years, if not decades, to recover. Due to the blockade, Nepal is currently facing a fuel crisis and running out of its medical supplies. Well everyone knows that, so I am not going to discuss that in detail. Also, I don't have access to the data to make strong claims. So, I will leave it to others.

What I am interested in is the rise of twitter activism in the present context of Nepal. The most intriguing thing is that everyone claims (in fact very aggressively) that they are the voice of the people. In this post, I will try to understand the dynamics of a social network based on its structure.

Core mantra¶

People Lie, Data Doesn't.

Methodology¶

In this post, I will be analyzing the twitter handle "@ktmwithmadhes". To be honest, I was intrigued after seeing this post https://twitter.com/ktmwithmadhes/status/667921913096736768 .

Before diving into the detail, I will briefly discuss few terminologies with a brief explanation

  • Graph: Social network
  • Node: User in a Social Network
  • Friend of X: set of users followed by X (specific to twitter)
  • Pagerank algorithm: Algorithm to rank the nodes in a graph by its centrality/influence. In a social graph, it ranks the nodes by its influence in the network. This algorithm is due to Google and is one of its core algorithm used for ranking the websites for search.
  • Strongly Connected Components: Set of the users who form a core of the graph/subgraph.

Data Collection¶

In this analysis, we crawl the social network of friends of "@ktmwithmadhes" and friends of its friends (ie depth 2 crawls from @ktmwithmadhes)

Stats:

  • number of nodes (people) : 49330
  • number of connections (friendship): 111500

We prune the social graph such that each user has two friends and is followed by two users in our data.

Analysis¶

Who are the most likely to influence within the "ktmwithmadhes" network?¶

We ran the PageRank algorithm to obtain the set of users who are more likely to influence the "ktmwithmadhes" social network. We list the top 10 influential users

  • @prashantktm
  • @manjushreethapa
  • @brb_laaldhwoj
  • @rdewan
  • @saatdobato
  • @ShresthaSubina
  • @sudheerktm
  • @belakoboli
  • @tulashah
  • @recordnepal

Analysing the core of the "ktmwithmadhes" network?¶

In this section, we visualize the core of the ktmwithmades network. We define strongly connected users(Strongly connected components) as the core of the social network.

In the figure below, we color code each node by its influence (PageRank) ie darker shade implies more influence

In [124]:
iplot(connected_components_fig)
Export to plot.ly »
MadeshWithKtm Core Network: Connected Components160μ180μ200μ220μ240μInfluence Index

Community within the core of the network¶

In this section, we model the community within the core of the ktmwithmades social network. We use mixed membership stochastic block model to infer community within the network. The following plot shows four community within ktmwithmades core network

In [125]:
iplot(community_within_core_network)

-- work on progress